package demo2;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 98152
 * Date: 2024-06-01
 * Time: 16:15
 */
public class Test3 {
    public static void main(String[] args) {
        String s = "aaabbbcccaaabbbccc";
        System.out.println(s.charAt(3));
        System.out.println(s.indexOf('c'));
        System.out.println(s.indexOf('b',6));
        System.out.println(s.indexOf("bbc"));
        System.out.println(s.indexOf("bbc", 13));
        System.out.println(s.lastIndexOf('b'));
        System.out.println(s.lastIndexOf('b', 6));
        System.out.println(s.lastIndexOf("bbc"));
        System.out.println(s.lastIndexOf("bbc", 4));
    }
}
